Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(user): add user permissions and tests #78

Merged
merged 1 commit into from
Dec 14, 2023
Merged

Conversation

Lapotor
Copy link
Collaborator

@Lapotor Lapotor commented Dec 14, 2023

Introduce user permissions to the UserController with corresponding tests. Define permissions for each controller function as follows:

  • index(): list-users
  • store(): create-users
  • show():
    • For viewing own user: show-users
    • For viewing all users: list-users
  • update():
    • For updating all users: update-users
    • For updating own user: update-users-self
  • destroy(): delete-users

This update ensures that user controller functions are now restricted and accessible based on the specified permissions. The associated tests validate the correct implementation of these permissions.

Signed-off-by: Valentin Sickert <[email protected]>
@Lapotor Lapotor added this to the v1.0.0 milestone Dec 14, 2023
@Lapotor Lapotor requested a review from whyauthentic December 14, 2023 18:14
@Lapotor Lapotor self-assigned this Dec 14, 2023
@whyauthentic whyauthentic merged commit a1aa608 into main Dec 14, 2023
15 checks passed
@whyauthentic whyauthentic deleted the feat/addUserPerms branch December 14, 2023 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants